package service.impl;

import dao.SmbmsBillDao;
import dao.SmbmsUserDao;
import dao.impl.SmbmsBillDaoImpl;
import dao.impl.SmbmsUserDaoImpl;
import pojo.SmbmsBill;
import pojo.SmbmsUser;
import service.SmbmsBillService;

import java.util.List;

public class SmbmsBillServiceImpl implements SmbmsBillService {

    //dao层
    private SmbmsBillDao smbmsBillDao = new SmbmsBillDaoImpl();
    @Override
    public List<SmbmsBill> queryBillByList(String productname, int ispayment, int currentPageNo, int pageSize,int providerId) throws Exception {
        return smbmsBillDao.queryBillByList(productname,ispayment,currentPageNo,pageSize,providerId);
    }

    @Override
    public int getproviderCount(String productname, int ispayment) throws Exception {
        return smbmsBillDao.getproviderCount(productname,ispayment);
    }

    @Override
    public SmbmsBill queryBillById(Long id) throws Exception {
        return smbmsBillDao.queryBillById(id);
    }

    @Override
    public int updateBill(SmbmsBill smbmsBill) throws Exception {
        return smbmsBillDao.updateBill(smbmsBill);
    }

    @Override
    public int deleteBill(Long id) throws Exception {
        return smbmsBillDao.deleteBill(id);
    }

    @Override
    public int addBill(SmbmsBill smbmsBill) throws Exception {
        return smbmsBillDao.addBill(smbmsBill);
    }


}
